import { useRouter, createRouter,  createWebHashHistory, RouteRecordRaw } from 'vue-router';
import Layout from '@/layout/index.vue'
// import Home from '../views/Home.vue';
// import About from '../views/about/About.vue';

const routes: RouteRecordRaw[]  = [
    {
        path: '/',
        name: 'Layout',
        component: Layout,
        redirect: '/dashboard',
        children: [
            {
                path: 'dashboard',
                name: 'Dashboard',
                component: () => import('@/views/dashboard/index.vue'),
                meta: {
                    title: 'Dashboard'
                }
            },
            {
                path: 'about',
                name: 'About',
                component: () => import('@/views/about/index.vue'),
                meta: {
                    title: 'About',
                },
            },
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router;
